package it.pecuswap.backend.wrappers;

import it.pecuswap.backend.entities.Users;
import it.pecuswap.commons.dto.UsersDTO;

public class UserWrapper{

	public static UsersDTO copyFromEntity(Users user) {
		UsersDTO userDTO = new UsersDTO();
		if (user != null && userDTO != null) {
			userDTO.setUserid(user.getUserid());
			userDTO.setUsername(user.getUsername());
			userDTO.setPassword(user.getPassword());
			userDTO.setFirstname(user.getFirstname());
			userDTO.setLastname(user.getLastname());
			userDTO.setDtOraInserimento(user.getDtOraInserimento());
			userDTO.setDtOraUltMod(user.getDtOraUltMod());
		}
		return userDTO;
	}

}
